﻿using BootstrapBlazorApp.Shared.Data;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace WebApplication1.Controllers
{
    [Route("[controller]")]
    [ApiController]
    public class DepartmentController : ControllerBase
    {
        [HttpGet]
        public IEnumerable<Department> Get()
        {
            var list = new List<Department>();
            list.Add(new Department()
            {
                Name = "第一根部门",
                Id = 1,
                HasChildren = true,
                PartentPosition = -1,
                Position = 0
            });
            list.Add(new Department()
            {
                Name = "第二根部门",
                Id = 2,
                HasChildren = true,
                PartentPosition = -1,
                Position = 0
            });
            list.Add(new Department()
            {
                Name = "第三根部门",
                Id = 3,
                HasChildren = true,
                PartentPosition = -1,
                Position = 0
            });
            return list;
        }
    }
}
